package cn.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import cn.pojo.Detail;

public interface DetailMapper {
	Integer totalCount(@Param("sortId") Long sortId);

	List<Detail> getDetails(@Param("sortId") Long sortId, @Param("rowNum") Integer rowNum,
			@Param("pagecount") int pagecount);

	@Select("select * from goods_detail where id=#{id}")
	Detail getDetailById(@Param("id") Long id);

	@Update("update goods_detail set remaining=#{i} where id=#{id}")
	int updateDetail(@Param("i") int i, @Param("id") Long id);

}
